home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
vbpong1a
/
intro.frm
< prev
next >
Wrap
Text File
|
1999-08-07
|
2KB
|
78 lines
VERSION 5.00
Begin VB.Form intro
BorderStyle = 0 'None
Caption = "Intro"
ClientHeight = 4500
ClientLeft = 0
ClientTop = 0
ClientWidth = 4500
LinkTopic = "Form1"
Picture = "intro.frx":0000
ScaleHeight = 300
ScaleMode = 3 'Pixel
ScaleWidth = 300
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.Timer tmrUnload
Interval = 5000
Left = 0
Top = 0
End
End
Attribute VB_Name = "intro"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rgn As Long
Dim bActive As Boolean
Dim balls(0 To 3) As New ball
Private Sub Form_Click()
bActive = False
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyEscape Then bActive = False
End Sub
Private Sub Form_Load()
Me.Show
bActive = True
For i = 0 To UBound(balls)
balls(i).SetXYVel Int(Rnd * 5) + 3, Int(Rnd * 5) + 3
balls(i).SetXY Int(Rnd * GetSystemMetrics(SM_CXSCREEN)) - 90, Int(Rnd * GetSystemMetrics(SM_CYSCREEN)) - 90
Next i
SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
rgn = CreateRoundRectRgn(0, 0, Me.ScaleWidth, Me.ScaleHeight, Me.ScaleWidth, Me.ScaleHeight)
SetWindowRgn Me.hWnd, rgn, True
While (bActive)
DoEvents
For i = 0 To UBound(balls)
balls(i).Move
balls(i).Update
Next i
Wend
For i = 0 To UBound(balls)
balls(i).xit
Next i
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
DeleteObject rgn
Shell "VBPong.exe", vbNormalFocus
End Sub
Private Sub tmrUnload_Timer()
bActive = False
End Sub